!(function ($, W) {
    W.getEchartBaseLineOpt = function (opt) {
        var echartBaseOpt = {
            title: {
                x: 'center'
            },
            tooltip: {
                trigger: 'axis'
            },
            toolbox: {
                show: true,
                feature: {
                    mark: {show: true},
                    dataView: {show: true, readOnly: false},
                    magicType: {show: true, type: ['line', 'bar']},
                    restore: {show: true},
                    saveAsImage: {show: true}
                }
            },
            xAxis: [
                {
                    type: 'category',
                    axisTick: {
                        alignWithLabel: true
                    },
                    splitLine: {
                        show: true,
                        lineStyle: {
                            // 使用深浅的间隔色
                            color: '#EEEEEE'
                        }
                    },
                    axisLine: {
                        show: true,
                        lineStyle: {
                            // 使用深浅的间隔色
                            color: '#333'
                        }
                    }
                }
            ],
            yAxis: [
                {
                    type: 'value',
                    splitLine: {
                        lineStyle: {
                            // 使用深浅的间隔色
                            color: '#EEEEEE'
                        }
                    },
                    splitLine: {
                        show: true,
                        lineStyle: {
                            // 使用深浅的间隔色
                            color: '#EEEEEE'
                        }
                    },
                    axisLine: {
                        show: true,
                        lineStyle: {
                            // 使用深浅的间隔色
                            color: '#333'
                        }
                    }
                }
            ],
            series: [
                {
                    name: '数据量',
                    type: 'line',
                    label: {
                        normal: {
                            show: true,
                            position: 'top',
                            distance: 10
                        }
                    },
                    markLine: {
                        data: [
                            {
                                type: 'average', name: '平均值', label: {
                                    normal: {
                                        position: 'end',
                                        formatter: '平均值'
                                    }
                                },
                            }
                        ]
                    },
                    itemStyle: {
                        normal: {
                            color: '#ec584a'
                        }
                    },
                    symbol: 'emptyCircle',
                    symbolSize: 15
                }
            ]
        };
        return $.extend(true, echartBaseOpt, opt);
    }
})(jQuery, window)
